package com.ruoyi.web.config;

import com.qcloud.cos.COSClient;
import com.qcloud.cos.ClientConfig;
import com.qcloud.cos.auth.BasicCOSCredentials;
import com.qcloud.cos.auth.COSCredentials;
import com.qcloud.cos.region.Region;

public class TencentCOSConfig {

    private static final String SECRET_ID = "AKIDCTaUI6oKdjcHjy0pKdmjV6VxFPM8izYy";
    private static final String SECRET_KEY = "RgkhV7XlmcGl7JH5DCzZv4zgHgtseNsA";
    private static final String REGION = "ap-beijing"; // 区域

    public static COSClient initCOSClient() {
        COSCredentials cred = new BasicCOSCredentials(SECRET_ID, SECRET_KEY);
        ClientConfig clientConfig = new ClientConfig(new Region(REGION));
        return new COSClient(cred, clientConfig);
    }
}
